Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alignment across repositories #148

Merged
merged 1 commit into from
Mar 30, 2024
Merged

Alignment across repositories #148

merged 1 commit into from
Mar 30, 2024

Conversation

brettcurtis
Copy link
Contributor

@brettcurtis brettcurtis commented Mar 30, 2024

Summary by CodeRabbit

  • Chores
    • Renamed jobs and adjusted configurations in GitHub workflows for clarity and context.
    • Removed unnecessary pre-commit hooks and updated tools to newer versions.
  • Documentation
    • Added cost estimates and updated provider versions in README files.
  • New Features
    • Added Datadog integration with a new enable_datadog variable for better monitoring.
  • Refactor
    • Introduced new variables and updated modules for enhanced configuration management.

@brettcurtis brettcurtis self-assigned this Mar 30, 2024
Copy link

coderabbitai bot commented Mar 30, 2024

Walkthrough

Walkthrough

The updates encompass renaming jobs, adjusting configurations, and updating dependencies across several GitHub workflow files and Terraform configurations. Key changes include simplifying environment naming, removing Infracost hooks, updating the Terraform pre-commit hook version, adding cost estimates in documentation, enhancing Datadog integration with a new variable, and refining labels for resources. These modifications streamline workflows, improve infrastructure management, and enhance monitoring capabilities.

Changes

File(s) Change Summary
.github/workflows/non-production.yml, .github/workflows/production.yml Renamed "global_infra" job to "global"; updated github_environment values; modified working_directory.
.github/workflows/sandbox.yml Adjusted configurations for sandbox environment to reflect context more accurately.
.pre-commit-config.yaml Removed Infracost hooks; updated pre-commit-terraform to v1.88.4.
README.md Added monthly cost estimates based on Infracost baseline costs.
global/README.md Updated google provider version; added enable_datadog variable.
global/backend.tf Included import statement for shared backend configuration.
global/locals.tf Introduced labels local variable with predefined values.
global/main.tf Modified datadog module for conditional integration; introduced cost_center attribute; updated label assignments.
global/tfvars/sandbox.tfvars Added enable_datadog variable set to true.
global/variables.tf Added enable_datadog variable for Datadog integration control.

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

infracost bot commented Mar 30, 2024

💰 Infracost report

Monthly cost will increase by $25 📈

Changed project Baseline cost Usage cost* Total change New monthly cost
global-infra-production +$0 -$5 -$5 $0
global-infra-sandbox +$0 -$5 -$5 $0
global-production +$0 +$5 +$5 $5
global-sandbox +$0 +$30 +$30 $30

*Usage costs were estimated with usage defaults, which can also be overridden in the config files.

Cost details (includes details of unsupported resources)
──────────────────────────────────
Project: global-infra-production
Module path: global/infra

- module.project.google_logging_project_sink.cis_2_2_logging_sink
  -$5

    - Logging data
      -$5, -10 GB*

Monthly cost change for global-infra-production (Module path: global/infra)
Amount:  -$5 ($5 → $0.00)

──────────────────────────────────
Project: global-infra-sandbox
Module path: global/infra

- module.project.google_logging_project_sink.cis_2_2_logging_sink
  -$5

    - Logging data
      -$5, -10 GB*

Monthly cost change for global-infra-sandbox (Module path: global/infra)
Amount:  -$5 ($5 → $0.00)

──────────────────────────────────
Project: global-production
Module path: global

+ module.project.google_logging_project_sink.cis_2_2_logging_sink
  +$5

    + Logging data
      +$5, +10 GB*

Monthly cost change for global-production (Module path: global)
Amount:  +$5 ($0.00 → $5)

──────────────────────────────────
Project: global-sandbox
Module path: global

+ module.datadog[0].google_pubsub_subscription.integration
  +$15

    + Message delivery data
      +$5, +0.125 TiB*

    + Retained acknowledged message storage
      +$5, +18 GiB*

    + Snapshot message backlog storage
      +$5, +18 GiB*

+ module.datadog[0].google_logging_project_sink.integration
  +$5

    + Logging data
      +$5, +10 GB*

+ module.datadog[0].google_pubsub_topic.integration
  +$5

    + Message ingestion data
      +$5, +0.125 TiB*

+ module.project.google_logging_project_sink.cis_2_2_logging_sink
  +$5

    + Logging data
      +$5, +10 GB*

Monthly cost change for global-sandbox (Module path: global)
Amount:  +$30 ($0.00 → $30)

──────────────────────────────────
Key: ~ changed, + added, - removed

*Usage costs were estimated with usage defaults from Infracost Cloud, which can also be overridden in the config files.

85 cloud resources were detected:
∙ 5 were estimated
∙ 74 were free
∙ 6 are not supported yet, rerun with --show-skipped to see details

Infracost estimate: Monthly cost will increase by $25 ↑
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Changed project                                    ┃ Baseline cost ┃ Usage cost ┃ Total change ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━╋━━━━━━━━━━━━━━┫
┃ global-infra-production                            ┃           +$0 ┃        -$5 ┃          -$5 ┃
┃ global-infra-sandbox                               ┃           +$0 ┃        -$5 ┃          -$5 ┃
┃ global-production                                  ┃           +$0 ┃        +$5 ┃          +$5 ┃
┃ global-sandbox                                     ┃           +$0 ┃       +$30 ┃         +$30 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━┻━━━━━━━━━━━━━━┛

Governance checks

❌ 1 blocking failure
25% Increases Monthly Cost

Cost increased by $25 (247%), threshold was 25%.

🟢 51 passed
50 FinOps policies, 1 Tagging policy, and 0 Guardrails passed.

View report in Infracost Cloud. This comment will be updated when code changes.

@brettcurtis brettcurtis marked this pull request as ready for review March 30, 2024 14:49
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6729b33 and d87a82d.
Files ignored due to path filters (4)
  • global/infra/infracost/non-production.yml is excluded by !**/*.yml
  • global/infra/infracost/production.yml is excluded by !**/*.yml
  • global/infra/infracost/sandbox.yml is excluded by !**/*.yml
  • infracost.yml is excluded by !**/*.yml
Files selected for processing (11)
  • .github/workflows/non-production.yml (1 hunks)
  • .github/workflows/production.yml (1 hunks)
  • .github/workflows/sandbox.yml (1 hunks)
  • .pre-commit-config.yaml (2 hunks)
  • README.md (1 hunks)
  • global/README.md (2 hunks)
  • global/backend.tf (1 hunks)
  • global/locals.tf (1 hunks)
  • global/main.tf (2 hunks)
  • global/tfvars/sandbox.tfvars (1 hunks)
  • global/variables.tf (1 hunks)
Files skipped from review due to trivial changes (1)
  • global/backend.tf
Additional Context Used
Additional comments not posted (11)
global/tfvars/sandbox.tfvars (1)

2-2: The addition of enable_datadog = true aligns well with the PR objectives and follows best practices for Terraform variable definition. This change effectively enables Datadog integration for the sandbox environment.

.pre-commit-config.yaml (1)

14-14: Updating the pre-commit-terraform repository revision to v1.88.4 is a good practice, ensuring compatibility with the latest Terraform practices and features.

global/variables.tf (1)

27-31: The introduction of the enable_datadog variable with a default value of false is a sensible addition, allowing for explicit opt-in to Datadog integration. This change aligns well with the PR objectives and follows best practices for Terraform variable definition.

.github/workflows/sandbox.yml (1)

19-32: The adjustments made to the job name, GitHub environment labels, and working directory in the sandbox workflow are well-aligned with the PR objectives. These changes improve clarity and accurately reflect the sandbox context, following best practices for GitHub Actions workflow configuration.

.github/workflows/non-production.yml (1)

18-31: Renaming the job from "global_infra" to "global" and adjusting the github_environment value and working_directory in the non-production workflow are positive changes. They enhance clarity and accurately represent the non-production environment, aligning well with the PR objectives.

.github/workflows/production.yml (1)

18-31: The changes made to the job name, github_environment value, and working_directory in the production workflow align well with the PR objectives. These adjustments enhance clarity and accurately represent the production environment, following best practices for GitHub Actions workflow configuration.

global/locals.tf (1)

5-10: The introduction of the labels local variable with specific values for environment, repository, platform, and team enhances the Terraform configuration by providing clear and relevant labels for different components. This change aligns well with the PR objectives.

global/README.md (2)

12-12: Updating the version of the google provider to 5.22.0 in the documentation ensures that users are aware of the specific version required for compatibility with the Terraform configurations. This change is well-documented and aligns with the PR objectives.


36-36: Adding the enable_datadog input variable to the documentation is a valuable update, providing users with clear information on how to enable Datadog integration. This addition aligns well with the PR objectives and enhances the documentation's utility.

README.md (1)

11-11: The addition of monthly cost estimates based on Infracost baseline costs is a valuable enhancement to the README. It provides clear insights into infrastructure costs, aligning with the PR's objectives. To further improve clarity, consider specifying whether these estimates are minimum, average, or maximum values, or if they pertain to a specific configuration or usage pattern.

global/main.tf (1)

55-55: The update to reference local.labels for label assignment in the project module is a good practice, enhancing consistency and maintainability of Terraform configurations.

global/main.tf Show resolved Hide resolved
@brettcurtis brettcurtis merged commit 8524af7 into main Mar 30, 2024
4 of 5 checks passed
@brettcurtis brettcurtis deleted the alignment branch March 30, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant